import 'userid_name_phone_entity.dart';

class UserFriendsEntity {
  UserIdNamePhoneEntity upCust;
  List<UserIdNamePhoneEntity> lstSameUp;
  List<UserIdNamePhoneEntity> lstChild;
  UserFriendsEntity({this.upCust, this.lstSameUp, this.lstChild});

  UserFriendsEntity.fromJson(Map<String, dynamic> json) {
    upCust = json['upCust'] != null
        ? new UserIdNamePhoneEntity.fromJson(json['upCust'])
        : null;
    if (json['lstSameUp'] != null) {
      lstSameUp = new List<UserIdNamePhoneEntity>();
      json['lstSameUp'].forEach((v) {
        lstSameUp.add(new UserIdNamePhoneEntity.fromJson(v));
      });
    }

    if (json['lstChild'] != null) {
      lstChild = new List<UserIdNamePhoneEntity>();
      json['lstChild'].forEach((v) {
        lstChild.add(new UserIdNamePhoneEntity.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.upCust != null) {
      data['upCust'] = this.upCust.toJson();
    }
    if (this.lstSameUp != null) {
      data['lstSameUp'] = this.lstSameUp.map((v) => v.toJson()).toList();
    }

    if (this.lstChild != null) {
      data['lstChild'] = this.lstChild.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
